namespace codebase.UI
{
    public class Renderer_4DSPE : Renderer
    {
        public FourDSPE SPE = new FourDSPE();

        public Renderer_4DSPE()
        {
            
        }

        public override int Width
        {
            get { return SPE.Width; }
        }

        public override int Height
        {
            get { return SPE.Height; }
        }

        public override int CharacterWidth
        {
            get { return SPE.CharWidth; }
        }

        public override int CharacterHeight
        {
            get { return SPE.CharHeight; }
        }

        public override void Clear()
        {
            SPE.Clear();
        }

        public override void DrawLine(int x1, int y1, int x2, int y2, int color)
        {
            SPE.DrawLine(x1, y1, x2, y2, color);
        }

        public override void DrawRectangle(int x1, int y1, int x2, int y2, int color)
        {
            SPE.DrawRectangle(x1, y1, x2, y2, color);
        }

        public override void DrawFilledRectangle(int x1, int y1, int x2, int y2, int color)
        {
            SPE.DrawFilledRectangle(x1, y1, x2, y2, color);
        }

        public override void DrawCircle(int x, int y, int radius, int color)
        {
            SPE.DrawCircle(x, y, radius, color);
        }

        public override void DrawFilledCircle(int x, int y, int radius, int color)
        {
            SPE.DrawFilledCircle(x, y, radius, color);
        }

        public override void DrawText(string text, int x, int y, bool transparent, int backcolor, int forecolor)
        {
            if (transparent)
            {
                SPE.TextOpacity(0);
            }
            else
            {
                SPE.TextOpacity(1);
                SPE.TextBackGroundColor(backcolor);
            }

            SPE.TextForeGroundColor(forecolor);
            SPE.MoveOrigin(x, y);
            SPE.PutString(text);
        }
    }
}
